#!/usr/bin/env python
# coding: utf-8

# In[1]:


import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams

rcParams['figure.figsize'] = (13.0, 7.0)
rcParams['lines.linewidth'] = 3
rcParams['font.size'] = 18

from jm.library.data_helper import filter_data, date_to_str
from jm.library.likelihood import Likelihood
from jm.library.additional_helpers import get_cols_over_time, plot_over_time

np.random.seed(1234)

rcParams['figure.figsize'] = (13.0, 7.0)
rcParams['lines.linewidth'] = 3
rcParams['font.size'] = 18


df_status = pd.read_csv('data/jesus_maria_status_Q1_deidentified.csv')
    

plt.clf()
ax = plot_over_time(filter_data(df_status, assignment_to_treatment=1), normalize=1e6)
plot_over_time(filter_data(df_status, assignment_to_treatment=0), normalize=1e6, ax=ax, linestyle='dashed')
plt.legend(['treatment', 'control'])
plt.ylabel('cumulative taxes collected (Millions of Soles)')

plt.tight_layout()
plt.savefig('figs/figOB3.pdf')
